<?php $this->start('admin_menu')?>
	<?php echo $this->element('admin_menu', array('str_item' => 'products')) ?>
<?php $this->end(); ?>

<div class="prototypes index">
	<h2><?php echo __('Prototypes'); ?></h2>
	<?php 
		echo $this->Session->flash(); 
		echo $this->Session->flash('good');
		echo $this->Session->flash('bad');
	?>
	<table cellpadding="0" cellspacing="0" class="table-listing">
	<tr>
			<th class="col-no"><input type="checkbox" id="check-all" title="<?php echo __('Check All') ?>" class="rcheckbox" /></th>
			<th><?php echo $this->Paginator->sort('name'); ?></th>
			<th><?php echo $this->Paginator->sort('description'); ?></th>
			<th><?php echo $this->Paginator->sort('status'); ?></th>
			<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
	foreach ($prototypes as $prototype): ?>
	<tr class="tr-row">
		<td class="col-no"><input type="checkbox" name="<?php echo ($prototype['Prototype']['id']) ?>" id="check-item-<?php echo ($prototype['Prototype']['id']); ?>" class="check-item" /> </td>
		<td class="canclick"><?php echo h($prototype['Prototype']['name']); ?>&nbsp;</td>
		<td class="canclick"><?php echo h($prototype['Prototype']['description']); ?>&nbsp;</td>
		<td class="canclick status-col"><?php echo h($prototype['Prototype']['status']); ?>&nbsp;</td>
		<td class="actions action-cm3">
			<?php echo $this->Html->link(__('Edit'), array('admin' => true, 'action' => 'edit', $prototype['Prototype']['id']), array('class' => 'act-lk edit-link')); ?>
			<?php echo $this->Form->postLink(__('Delete'), array('admin' => true, 'action' => 'delete', $prototype['Prototype']['id']), array('class' => 'act-lk del-link'), __('Are you sure you want to delete # %s?', $prototype['Prototype']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>

	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>

<div class='actionct'>
	<span class='btn-act'><span><?php echo $this->Html->link(__('New Prototype'), array('action' => 'add')); ?></span></span>
</div>

